package flc.ast.adapter;

import androidx.annotation.NonNull;

import com.blankj.utilcode.util.AppUtils;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import flc.ast.R;
import flc.ast.bean.MyAppBean;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;
import stark.common.basic.adaptermutil.StkSingleSpanProvider;

public class BackgroundAdapter extends StkProviderMultiAdapter<Integer> {

    public BackgroundAdapter() {
        addItemProvider(new StkSingleSpanProvider<>(150));
        addItemProvider(new  BackgroundProvider());
    }


    private class  BackgroundProvider extends BaseItemProvider<Integer> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_background;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, Integer bean) {
            baseViewHolder.setImageResource(R.id.ivBackgroundItemImg,bean);
        }
    }
}
